<template>
  <section>
    <div v-if="row.pickCovenant">
      <div v-if="fieldName === 'arrivalTime'">
        {{ row.pickCovenant.arrivalTime || '--' }}
      </div>
      <div v-if="fieldName === 'reservationInfo'">
        {{ row.pickCovenant.driverName }} | {{ row.pickCovenant.contactMobile }} | {{ row.pickCovenant.idcard }}<br />
        {{ row.pickCovenant.plateNo }} | {{ row.pickCovenant.vehicleLoad }}吨
      </div>
      <div v-if="fieldName === 'pickCovenantStatusDesc'">
        {{ row.pickCovenant && row.pickCovenant.pickCovenantStatus  ? '是' : '否'  }}
      </div>
    </div>
    <div v-else>
      {{ fieldName != 'pickCovenantStatusDesc'  ? '--' : '否'  }}
    </div>
  </section>
</template>

<script>
export default {
  name: "ReservationInfo",
  props: {
    row: {
      type: Object,
      default: () => { }
    },
    fieldName: {
      type: String
    },
    classFlag: {
      type: String,
      default: ""
    }
  }
};
</script>
<style scoped>
.section-wrap {
  width: 100%;
  display: -webkit-box;
  word-break: break-all;
  text-overflow: ellipsis;
  overflow: hidden;
  /* white-space: pre-line; */
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
.red {
  color: var(--prev-color-text-red);
}
</style>
